import React from 'react';
import { Button } from 'antd';
import { Link } from 'dva/router';
import Result from 'components/Result';
import styles from './RegisterResult.less';
import loginStyles from './Login.less';

const actions = (
    <div className={styles.actions}>
        <Link to="/">返回首页</Link>
        <Link to="/options">
            <Button type="primary" size="large">
                身份认证
            </Button>
        </Link>
    </div>
);

export default ({ location }) => (
    <div className={loginStyles.main}>
        <div className={loginStyles.introduce} />
        <div className={loginStyles.login}>
            <Result
                className={styles.registerResult}
                type="success"
                title={
                    <div className={styles.title}>
                        恭喜
                        {location.state ? location.state.account : ''}
                        ，注册成功!
                    </div>
                }
                description="只需要完成身份认证，即可接入平台"
                actions={actions}
                style={{ height: 397 }}
            />
        </div>
    </div>
);
